<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../static/css/show.css">
</head>
<body>
    student --- show()<br>
    foreach方式:
    <table width="500" border="1">
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>电话</th>
        </tr>
        {foreach $stu as $v}
            <tr>
                <td>{$v['id']}</td>
                <td>{$v['name']}</td>
                <td>
                    {if $v['sex'] == 0}
                        <span>男</span>
                    {else/}
                        <span>女</span>
                    {/if}                    
                </td>
                <td>
                    {if $v['phone'] != ''}
                        <span>{$v['phone']}</span>
                    {else/}
                        <span>没留下这个信息</span>
                    {/if}                    
                </td>
            </tr>
        {/foreach}
    </table>
        volist方式:
        <table width="500" border="1">
            <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>电话</th>
            </tr>
            {volist name="stu" id="v"}
                <tr>
                    <td>{$v['id']}</td>
                    <td>{$v['name']}</td>
                    <td>
                        {if $v['sex'] == 0}
                            <span>男</span>
                        {else/}
                            <span>女</span>
                        {/if}                    
                    </td>
                    <td>
                        {if $v['phone'] != ''}
                            <span>{$v['phone']}</span>
                        {else/}
                            <span>没留下这个信息</span>
                        {/if}                    
                    </td>
                </tr>
            {/volist}

    </table>
</body>
</html>